﻿using System.Linq;

namespace WJ.Infrastructure.Data
{
    /// <summary>
    /// 分页数据源
    /// </summary>
    public class PageQueryable<T>
    {
        /// <summary>
        /// 总页数
        /// </summary>
        public int RowCount { get; set; }

        /// <summary>
        /// 当前页数据集合
        /// </summary>
        public IQueryable<T> Data { get; set; }

        public PageData<T> ToList()
        {
            return new PageData<T>(){Data=Data.ToList(),RowCount=RowCount};
        }
    }
}
